#include "../include/actionsem.h"
#include <string>
#include <iostream>
using namespace std;

vector<char> ActionSem::buffer;

ActionSem::ActionSem()
{
    buffer.clear();

    consume=false;
    err=false;

   }


ActionSem::~ActionSem()
{
    //dtor
}

void ActionSem::setErr(bool e){err=e;}
bool ActionSem::getErr(){  return err;}

bool ActionSem::getconsume(){return consume;}

void ActionSem::setconsume(bool c){consume=c;}

int ActionSem::Activar(char c){return NADA;}

int ActionSem::getposBuff(){return buffer.size();}

//void ActionSem::actualizar(){buffer.size();}

void ActionSem::addBuff(char c){
	 buffer.push_back(c);

}
void ActionSem::eliminar(){
	buffer.pop_back();
}

void ActionSem::resetBuff(){
buffer.erase(buffer.begin(),buffer.end());
buffer.clear();
}
string ActionSem::getBuffer(){
    string s( buffer.begin(), buffer.end() );

    return s;}

